const cloud = require('@alipay/faas-server-sdk');
exports.main = async (event, context) => {
  const ids = event.ids;
  console.log('doc detail:', ids);
  const db = cloud.database();
  //遍历购物车列表，清空购物车数据
  for (const id of ids) {
    const result = await db.collection("mall_shop_car").doc(id).remove();
  }
  return true;
};